package com.chanzany.memento.base;

/**
 * @Author ChanZany
 * @Date 2021/10/19 17:13
 * @Version 1.0
 * 发起人
 */
public class Originator {
    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Memento createMemento(){
        return new Memento(state);
    }

    public void restoreMemento(Memento m) {
        this.setState(m.getState());
    }
}
